package com.lz.a;

import java.util.Scanner;

/**
 * @ClassName Demo10
 * @Description 输入数字1~7，输出对应星期几
 * @Author 2214361854
 * @Date 2022/5/26 22:35
 * @Version 1.0
 */
public class Demo10 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (true) {
            System.out.println("输入数字1~7，输出对应星期");
            xinQi(scanner.nextInt());
        }
    }

    private static void xinQi(int a) {
        switch (a) {
            case 1:
                System.out.println("星期一");
                break;
            case 2:
                System.out.println("星期二");
                break;
            case 3:
                System.out.println("星期三");
                break;
            case 4:
                System.out.println("星期四");
                break;
            case 5:
                System.out.println("星期五");
                break;
            case 6:
                System.out.println("星期六");
                break;
            case 7:
                System.out.println("星期七");
                break;
            default:
                System.out.println("输入错误");
        }
    }
}
